import {defineStore} from "pinia"

export const mycounter=defineStore('mycounter',{
    state(){  //声明变量
        return {
            number:100
        }
    },actions:{
        add(){
           return this.number ++
        }
    }, persist: {
        enabled: true,
        strategies: [
          {  storage: localStorage, paths:["number"] }
        ]
    }
})